<template>
  <div>
    <div id="slider" class="mui-slider">
      <div
        id="sliderSegmentedControl"
        class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"
      >
        <div class="mui-scroll">
          <a
            class="mui-control-item mui-active"
            href="#item1mobile"
            data-wid="tab-top-subpage-1.html"
          >全部</a>
          <a class="mui-control-item" href="#item2mobile" data-wid="tab-top-subpage-2.html">家居生活</a>
          <a class="mui-control-item" href="#item3mobile" data-wid="tab-top-subpage-3.html">摄影设计</a>
          <a class="mui-control-item" href="#item4mobile" data-wid="tab-top-subpage-4.html">明星美女</a>
          <a class="mui-control-item" href="#item5mobile" data-wid="tab-top-subpage-5.html">古典美女</a>
        </div>
      </div>
    </div>
    <ul class="ul_img">
      <router-link to="/home/photointo" tag="li" v-for="item in list" :key="item.id" class="li_l">
        <img class="li_img" v-lazy="item" />
		<div class="wz">
           <h3>夏季靓妆，风格多变</h3>
		   <div class="wz_d"></div>
		</div>
      </router-link>
    </ul>
  </div>
</template>

<script>
// 引入muijs文件，实现标题滚动效果
import mui from "../../lib/mui/js/mui.min.js";

// 由于webpack使用的是严格模式，而导入的mui.js文件中有个别方法并没有在页面1中使用，所以会导致报错
// 解决方法：禁用webpack中的严格模式安装 npm install babel-plugin-transform-remove-strict-mode
// 然后在.babelrc中配置"transform-remove-strict-mode"

export default {
  data() {
    return {
		list:[
			"https://img.alicdn.com/imgextra/i2/2212455958/O1CN01ERo7Em1tsoLePro2R_!!2212455958.jpg",
			"https://img.alicdn.com/imgextra/i2/2203438098160/O1CN010WhfvS2A9KUGuHcfX_!!2203438098160.jpg",
			"https://img.alicdn.com/imgextra/i3/2066814571/O1CN01wQGdJW1jdZ030pIjT_!!2066814571.jpg",
			"https://img.alicdn.com/imgextra/i2/263817957/O1CN01Hjiqsj28eM5CljqlM_!!263817957.jpg",
			"https://g-search1.alicdn.com/img/bao/uploaded/i4/i3/1766047907/O1CN018AqrIr28HSHJpSdXb_!!0-item_pic.jpg_580x580Q90.jpg_.webp"
		]
	}
  },
  mounted() {
    // 当组件中的DOM结构被渲染好并放到页面中后，会执行这个钩子函数
    // 初始化控件
    mui(".mui-scroll-wrapper").scroll({
      deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
    });
  },
  methods: {}
};
</script>
<style  scoped>
* {
  touch-action: pan-y;
}
img[lazy=loading] {
  width: 40px;
  height: 300px;
  margin: auto;
}
.ul_img{
	padding:0 10px;
}
.li_l{
	list-style:none;
	background-color: #ccc;
	box-shadow:0 0 6px #999;
	margin-bottom:10px;
	text-align: center;
}
.li_img{
	width:100%;
	vertical-align:middle;
}

</style>